package com.sina.weibo.view;

import android.content.Context;
import android.text.SpannableString;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.TextView.BufferType;
import com.sina.weibo.Utils;
import com.sina.weibo.models.Comment;
import java.util.Date;

public class CommentItemView extends LinearLayout
{
  private Context context;
  private TextView mContent;
  private TextView mDateTime;
  private TextView mNickname;

  public CommentItemView(Context paramContext, Comment paramComment)
  {
    super(paramContext);
    this.context = paramContext;
    View localView = ((LayoutInflater)paramContext.getSystemService("layout_inflater")).inflate(2130903047, this);
    TextView localTextView1 = (TextView)findViewById(2131623959);
    this.mContent = localTextView1;
    TextView localTextView2 = (TextView)findViewById(2131623957);
    this.mNickname = localTextView2;
    TextView localTextView3 = (TextView)findViewById(2131623958);
    this.mDateTime = localTextView3;
    update(paramComment);
  }

  public void setContent(String paramString)
  {
    this.mContent.setText(paramString);
  }

  public void setDateTime(String paramString)
  {
    this.mDateTime.setText(paramString);
  }

  public void setNickname(String paramString)
  {
    this.mNickname.setText(paramString);
  }

  public void update(Object paramObject)
  {
    Comment localComment = (Comment)paramObject;
    StringBuilder localStringBuilder2;
    String str3;
    if ((localComment.conick != null) && (localComment.conick.length() != 0))
    {
      String str1 = String.valueOf(this.context.getString(2131427435));
      StringBuilder localStringBuilder1 = new StringBuilder(str1).append("@");
      String str2 = localComment.conick;
      localStringBuilder2 = localStringBuilder1.append(str2).append(":");
      str3 = localComment.content;
    }
    for (String str4 = str3; ; str4 = localComment.content)
    {
      SpannableString localSpannableString = new SpannableString(str4);
      Utils.highlightContent(getContext(), localSpannableString);
      TextView localTextView1 = this.mContent;
      TextView.BufferType localBufferType = TextView.BufferType.SPANNABLE;
      localTextView1.setText(localSpannableString, localBufferType);
      TextView localTextView2 = this.mNickname;
      String str5 = localComment.nick;
      localTextView2.setText(str5);
      Context localContext = this.context;
      Date localDate = localComment.time;
      String str6 = Utils.formatDate(localContext, localDate);
      this.mDateTime.setText(str6);
      return;
    }
  }
}

/* Location:           D:\Program Files\eclipse\apktool-r01-3\新浪微博\classes.dex.dex2jar.jar
 * Qualified Name:     com.sina.weibo.view.CommentItemView
 * JD-Core Version:    0.6.0
 */